<div id="content">
  <div class="row s_page_title">
    <sa-big-breadcrumbs
      [items]="['安装管理[环卫]', '安装维修日报']"
      icon="fa fa-newspaper-o"
      class="col-xs-12 col-sm-7 col-md-7 col-lg-4"
    ></sa-big-breadcrumbs>
  </div>

  <sa-widgets-grid>
    <div class="s_table">
      <div sa-widget [editbutton]="false" color="darken" class="clearfix">
        <header>
          <span class="widget-icon"><i class="fa fa-table"></i></span>
          <h2>安装维修日报</h2>
        </header>
        <div>
          <div class="widget-body no-padding">
            <div class="page-header clearfix s_table_opreation">
              <div class="left page-header-btn" style="width: calc(100% - 220px)">
                <div class="top_module">
                  <span class="module_text">项目名称</span>
                  <sa-company-tree
                    companyTreeId="companyTree"
                    (companySelected)="companySelected($event)"
                  ></sa-company-tree>
                </div>
                <div class="top_module">
                  <span class="module_text">录入人员</span>
                  <div class="s_hover_box">
                    <select class="select2" id="userNameSelect2" style="width: 150px">
                      <option value=""></option>
                    </select>
                    <div class="s_del_icon" (click)="delUserName()">x</div>
                  </div>
                </div>

                <div class="top_module">
                  <span class="module_text">时间</span>
                  <div class="s_hover_box" style="vertical-align: top">
                    <input
                      class="module_inp top_module_select form-control picker"
                      name="reportDate"
                      autocomplete="off"
                      id="reportDate"
                      [(ngModel)]="tableParam.reportDate"
                      placeholder="时间"
                    />
                    <div class="s_del_icon" (click)="delReportDate()">x</div>
                  </div>
                </div>
                <!--<div class="selectDate top_module">
                                    <table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)" ></table-select-date>
                                </div>-->
                <!--<div class="selectDate top_module">
									<div class="input-daterange input-group s_selected_time_box s_hover_box">
										<input type="text" [(ngModel)]='startTime' class="form-control s_selected_time" id="datetimepicker3"  autocomplete="off" placeholder="选择开始时间"/>
										<span class="s_selected_time_spe">至</span>
										<input type="text" [(ngModel)]='endTime' class="form-control s_selected_time" id="datetimepicker4"  autocomplete="off" placeholder="选择结束时间"/>
										<div class="s_del_icon" (click)='del_date()'>x</div>
									</div>
								</div>-->
                <button class="btn btn-primary" (click)="table_search()">查询</button>
                <button class="btn btn-primary" (click)="table_export()">导出</button>
              </div>
              <!--<div class="right top-search">
								<input type="text" [(ngModel)]="tableParam.searchKey" (change)="table_search()" class="search-input" placeholder="车牌号码、 公司名称...">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>-->
            </div>
            <div class="table_scroll">
              <table
                class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table"
              >
                <thead>
                  <tr>
                    <th>项目名称</th>
                    <th>时间</th>
                    <th>计划车辆</th>
                    <th>实际车辆</th>
                    <th>到场人员</th>
                    <th>主机</th>
                    <th>走线</th>
                    <th>接近开关</th>
                    <th>铁板+传感器</th>
                    <th>读卡器</th>
                    <th>显示器</th>
                    <th>标定</th>
                    <th>验证</th>
                    <th>录入人员</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  <tr *ngFor="let row of tableData; let i = index" [attr.data-index]="i">
                    <td>{{ row.projectName }}</td>
                    <td>{{ row.reportDate }}</td>
                    <td>{{ row.liveSituation && row.liveSituation.planCount }}</td>
                    <td>{{ row.liveSituation && row.liveSituation.realCount }}</td>
                    <td>{{ row.personnelSituation && row.personnelSituation.personCount }}</td>
                    <td>{{ row.installedSituation && row.installedSituation.hostCount }}</td>
                    <td>{{ row.installedSituation && row.installedSituation.tracesCount }}</td>
                    <td>{{ row.installedSituation && row.installedSituation.switchCount }}</td>
                    <td>{{ row.installedSituation && row.installedSituation.sensorCount }}</td>
                    <td>{{ row.installedSituation && row.installedSituation.cardCount }}</td>
                    <td>{{ row.installedSituation && row.installedSituation.screenCount }}</td>
                    <td>{{ row.calibrationSituation && row.calibrationSituation.calibrationCount }}</td>
                    <td>{{ row.calibrationSituation && row.calibrationSituation.verifyCount }}</td>
                    <td>{{ row.userName }}</td>
                    <td>
                      <button type="button" (click)="repairedDailyDetail(row)">详细</button>
                      <!--<button type="button" (click)="editRow(row)">编辑</button>-->
                      <button type="button" (click)="deleteRow(row)">删除</button>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <!--<div style="height: 60px;line-height: 60px;text-align: center;color: #ccc;">
                            <span *ngIf="tableData.length > 0">共{{tableData.length}}条数据</span>
                            <span *ngIf="tableData.length == 0">暂无数据</span>
                        </div>-->
            <div class="table-fix clearfix">
              <paginator
                [totalRecords]="totalCount"
                [rows]="pageSize"
                [currentPage]="curPage - 1"
                (onPageChange)="paginate($event)"
              ></paginator>
              <button type="button" class="btn default refresh_btn" (click)="refresh()">
                <i class="fa fa-refresh"></i>
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </sa-widgets-grid>
</div>
